<?php
require 'smarty/Smarty.class.php';
require 'functions.php';
$obj = new Smarty;
$obj->template_dir='view';
$obj->compile_dir='compile';

$data=[
	[
		'sname'=>'小明',
		'age'=>33
	],
	[
		'sname'=>'李四',
		'age'=>15
	]
];
$obj->assign('data',$data);
$obj->display('4.html');